<?php
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the id=main div and all content after
 *
 * @package WordPress
 * @subpackage ManterRealty
 */
?>

    </div><!-- #main -->
        <footer id="colophon" role="contentinfo" class="footer_wrap">
            <div class="footer">
                <div class="footer_cols clearfix">
                	<div class="col col_1">
                    	<a class="footer_home_link" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
                        <div class="company_info">
                        	<span>Phone:</span> (603) 255 3515
                        </div>
                        <div class="company_info">
                        	<span>Fax:</span> (603) 225 5671
                        </div>
                        <div class="company_info">
                        	<span>Email:</span> <a href="mailto:nhbroker4u@aol.com">nhbroker4u@aol.com</a>
                        </div>
                        <div class="copyright">Copyright &copy; <?php echo date('Y'); ?> Manter Realty, LLC</div>
                    </div>
                    <div class="col col_2">
                        <ul class="footer_nav">
							<?php
								$parent = 2; // Listings
								$args=array(
								  'child_of' => $parent
								);
								$pages = get_pages($args);  
								if ($pages) {
								  $pageids = array();
								  foreach ($pages as $page) {
									$pageids[]= $page->ID;
								  }
								
								  $args=array(
									'title_li' => '',
									'include' =>  $parent . ',' . implode(",", $pageids)
								  );
								  wp_list_pages($args);
								}
							?> 
                        </ul>
                    </div>
                    <div class="col col_3">
                    	<ul class="footer_nav">
							<?php
								$parent = 34; // Knowledge Center
								$args=array(
								  'child_of' => $parent
								);
								$pages = get_pages($args);  
								if ($pages) {
								  $pageids = array();
								  foreach ($pages as $page) {
									$pageids[]= $page->ID;
								  }
								
								  $args=array(
									'title_li' => '',
									'include' =>  $parent . ',' . implode(",", $pageids)
								  );
								  wp_list_pages($args);
								}
							?> 
                        </ul>
                    </div>
                    <div class="col col_4">
                    	<ul class="footer_nav">
							<?php
								$parent = 38; // About
								$args=array(
								  'child_of' => $parent
								);
								$pages = get_pages($args);  
								if ($pages || $parent) {
								  $pageids = array();
								  foreach ($pages as $page) {
									$pageids[]= $page->ID;
								  }
								
								  $args=array(
									'title_li' => '',
									'include' =>  $parent . ',' . implode(",", $pageids)
								  );
								  wp_list_pages($args);
								}
							?> 
                        </ul>
                    </div>
                    <div class="col col_5">
                    	<ul class="footer_nav">
							<?php
								$parent = 40; // Contact
								$args=array(
								  'child_of' => $parent
								);
								$pages = get_pages($args);  
								if ($pages || $parent) {
								  $pageids = array();
								  foreach ($pages as $page) {
									$pageids[]= $page->ID;
								  }
								
								  $args=array(
									'title_li' => '',
									'include' =>  $parent . ',' . implode(",", $pageids)
								  );
								  wp_list_pages($args);
								}
							?> 
                        </ul>
                    </div>
                  	<div class="clear"></div>
                </div>
            </div>
        </footer><!-- #colophon -->
    </div><!-- #page -->
</div><!-- .site_wrap -->
<?php wp_footer(); ?>

</body>
</html>